package ink.tiptop.convert;

import ink.tiptop.pojo.Apple;
import ink.tiptop.pojo.Fruit;
import ink.tiptop.pojo.FruitDto;
import ink.tiptop.factory.FruitFactory;
import org.mapstruct.BeanMapping;
import org.mapstruct.Mapper;

/**
 * @author zjf
 * @date 2020-08-15 17:58
 当返回结果为不确定类型时候,可以指定返回结果类型
 这里好像必须要指定 uses 注入Factory才行
 */
@Mapper(uses = FruitFactory.class)
public interface Z_UncertainConvert {

    @BeanMapping( resultType = Apple.class )
    Fruit map(FruitDto source);

}
